package com.kuaimacode.kframework.common;

import lombok.Getter;

public final class Constant {

    public static final String UTF8 = "UTF-8";

    // Default size of per page
    public static final int PAGE_SIZE = 20;

    // Default number indicates all page
    public static final int ALL_PAGE = -999;

    // indicates empty string
    public static final String EMPTY_STRING = "";

    //
    public static final String PAOTUI = "跑腿";
    public static final String WAIMAI = "叫外卖";

    //订单前缀
    public static final String  ORDER_PRE = "HK";

    //交易订单前缀
    public static final String  OUT_TRADE_NO_PRE = "HK";


    //打赏订单前缀
    public static final String  REWARD_OUT_TRADE_NO_PRE = "RE";

    //代收货款订单前缀
    public static final String  COLLECTION_OUT_TRADE_NO_PRE = "CO";

    //技术服务不定价订单前缀
    public static final String  FEE_OUT_TRADE_NO_PRE = "FE";

    //充值订单前缀
    public static final String  RECHARGE_TRADE_NO_PRE = "RC";

    /**
     * 登陆时获取session中验证码的key
     */
    public static final String LOGIN_VERIFY_CODE_KEY = "login_verify_code";
    /**
     * dev环境表示
     */
    public static final String DEV_ENV_VALUE = "dev";

    /**
     * 默认分站id
     */
    public static final String DEFAULT_AGENT_ID = "000000";

    public static final String WEATHER_DICT_NAME =  "WEATHER";



    /**
     * 用户优惠券使用状态
     * 0 未使用  1 已使用  2 已过期 3 已删除
     */
    public static final String COUPON_STATUS_NOT_USED = "0";
    public static final String COUPON_STATUS_USED = "1";
    public static final String COUPON_STATUS_EXPIRE = "2";
    public static final String COUPON_STATUS_DEL = "3";



    public static final String SYS_PARAM_SWITCH_ON = "ON";
    public static final String SYS_PARAM_SWITCH_OFF = "OFF";



    public static final String SYS_PARAM_FEE_NIGHT_SWITCH = "FEE_NIGHT_SWITCH";
    public static final String SYS_PARAM_FEE_WEATHER_SWITCH = "FEE_WEATHER_SWITCH";
    public static final String SYS_PARAM_FEE_HOLIDAY_SWITCH = "FEE_HOLIDAY_SWITCH";


    public static final String[] SYS_PARAM_INIT_KEY = new String[]{SYS_PARAM_FEE_NIGHT_SWITCH,SYS_PARAM_FEE_WEATHER_SWITCH,SYS_PARAM_FEE_HOLIDAY_SWITCH};
    public static final String[] SYS_PARAM_INIT_NOTE = new String[]{"深夜时间临时加价开关","特殊天气临时加价开关","节假日临时加价开关"};
    public static final String[] SYS_PARAM_INIT_VALUE = new String[]{SYS_PARAM_SWITCH_OFF,SYS_PARAM_SWITCH_OFF,SYS_PARAM_SWITCH_OFF};


    /**
     * 后管登陆用户ID key
     */
    public static final String ADMIN_USER_ID = "user_id";

    /**
     * 分站登陆用户ID key
     */
    public static final String AGENT_USER_ID = "agent_user_id";

    /**
     * 分站登陆ID
     */
    public static final String AGENT_ID = "agent_id";

    /**
     * 服务大类字典name
     */
    public static final String SERVICE_CLASS_DICT_NAME = "SERVICE_CLASS";

    /**
     * 提现手续费名臣
     */
    public static final String DRAW_RATE_PARAM_NAME = "WITHDRAW_RATE";

    public static final String ALI_TOKEN_KEY = "ali_token";
    public static final String ALI_TOKEN_EXPIRE_KEY = "ali_token_expire";

    /**
     * 优惠券类型
     */
    public interface CouponType{
        Integer FULL_CUT = 1; //满减券
        Integer OUTRIGHT = 2; //立减券
    }


    /**
     * 分站开关状态
     * @author Administrator
     * @date 2018/8/14
     */
    @Getter
    public enum AgentStatEnum {

        ON(0, "正常"),
        OFF(1, "关闭");

        private Integer code;

        private String message;

        AgentStatEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 分站交易类型
     */
    @Getter
    public enum AgentAccountTranTypeEnum{
        //<#--1：订单抽成 2 ：保费收入 3：手续费收入 4 提现失败退款-->
        //<#--11：提现 12:奖励 13罚款-->
        PERCENTAGE(1,"订单抽成"),
        INSURE(2,"保费收入"),
        FEE(3,"手续费收入"),
        DRAW(11,"提现");


        private Integer code;

        private String message;

        AgentAccountTranTypeEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }


    }


    /**
     * 订单状态
     */
    @Getter
    public enum OrderStatusEnum {
        WAIT_PAY(1,"待支付"),
        WAIT_ACCEPT(2, "待接单"),
        SERVERING(3, "服务中"),
        FETCHING(4, "取货中"),
        SENDING(5, "送货中"),
        WAIT_EVLAUTE(6, "待评价"),
        OK(7, "已完成"),
        CANCLE(8, "已取消"),
        CANCLEING(9, "取消中"),
        CANCLE_FAIL(10, "取消失败");

        private Integer code;

        private String message;

        OrderStatusEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 服务大类
     */
    @Getter
    public enum OrderTypeEnum {
        PAO_TUI(1,"跑腿"),
        ANY_HELP(2, "万能帮办"),
        MAINTAIN(3, "维修"),
        INSTALL(4, "安装");

        private Integer code;
        private String message;

        OrderTypeEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 跑腿子类
     */
    @Getter
    public enum PaotuiTypeEnum {
        HELP_TAKE(11,"帮我送"),
        HELP_SEND(12, "帮我取"),
        ANY_BUY(13, "随意购"),
        TAKE_OUT(14, "外卖");

        private Integer code;
        private String message;

        PaotuiTypeEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 删除状态
     */
    @Getter
    public enum DeleteStateEnum {
        NORMAL(0, "正常"),
        DELETE(1, "已删除");
        private Integer code;
        private String message;
        DeleteStateEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 支付类型
     * @author Administrator
     * @date 2018/8/14
     */
    @Getter
    public enum PayTypeEnum {
        //1-微信支付 2-支付宝支付
        WXPAY(1, "微信支付"),
        WXXCXPAY(3, "微信小程序支付"),
        ALIPAY(2, "支付宝支付");
        private Integer code;
        private String message;
        PayTypeEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 反馈类型
     */
    @Getter
    public enum FeedbackTypeEnum {
        COMPLAIN(1, "投诉"),
        FEEDBACK(2, "反馈");
        private Integer code;
        private String message;
        FeedbackTypeEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 字典等级
     */
    @Getter
    public enum DictLevelEnum {
        FIRST(1, "一级"),
        SECOND(2, "二级");
        private Integer code;
        private String message;
        DictLevelEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    @Getter
    public enum AccountTypeEnum {
        ACCOUNT(1, "余额账户"),
        COLLECT(2, "代收款账户");
        private Integer code;
        private String message;
        AccountTypeEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 万能帮办定价方式
     * 定价方式 1 定价 2 不定价
     */
    @Getter
    public enum PriceWayEnum {
        SURE_PRICE(1, "定价"),
        NOT_SURE_PRICE(2, "不定价");
        private Integer code;
        private String message;
        PriceWayEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }
    /**
     * 是否
     * 0 否 1 是
     */
    @Getter
    public enum IsNotEnum {
        NO(0, "否"),
        YES(1, "是");
        private Integer code;
        private String message;
        IsNotEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }


    /**
     * 是否 1 是 2 否
     */
    @Getter
    public enum IsOrNotEnum {
        IS(1, "是"),
        NOT(0, "否");
        private Integer code;
        private String message;
        IsOrNotEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 是否 1 是 2 否
     */
    @Getter
    public enum InOutEnum {
        IN(1, "收入"),
        OUT(2, "支出"),
        RECHARGE(5, "充值");
        private Integer code;
        private String message;
        InOutEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 是否 1 是 2 否
     */
    @Getter
    public enum DictStatusEnum {
        NORMAL(1, "正常"),
        FREEZE(2, "冻结"),
        DELETE(3,"删除");
        private Integer code;
        private String message;
        DictStatusEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 订单取消操作1不同意2同意3改派
     */
    @Getter
    public enum CancleDecidedEnum {
        NO(1, "不同意"),
        YES(2, "同意"),
        OTHER(3, "改派");
        private Integer code;
        private String message;
        CancleDecidedEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 代收货款支付状态
     * 1-未支付  2-已支付 3-支付失败
     */
    @Getter
    public enum CollectionPayStatusEnum {
        NOT_PAY(1, "未支付"),
        PAYED(2, "已支付"),
        PAY_FAIL(3, "支付失败");
        private Integer code;
        private String message;
        CollectionPayStatusEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }


    /**
     * 优惠券状态  ，
     */
    @Getter
    public enum CouponStatusEnum {
        NORMAL(0, "正常"),
        STOP(1, "停用"),
        EXPIRE(2, "过期"),
        DELETE(3, "删除");
        private Integer code;
        private String message;
        CouponStatusEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 详情模板类型
     * 1-跑腿帮我送、帮我取  2-随意购普通 3-随意购附近购买 4-技术服务类定价  5-技术服务类不定价 6 -合作商家
     */
    @Getter
    public enum DetailTemplateEnum {
        HELP(1, "跑腿帮我送、帮我取"),
        BUY_NORMAL(2, "随意购普通"),
        BUY_NEARBY(3, "随意购附近购买"),
        TEC_PRICE_SURE(4, "技术服务类定价"),
        TEC_PRICE_NOSURE(5, "技术服务类不定价"),
        PARTNER(6, "合作商家");
        private Integer code;
        private String message;
        DetailTemplateEnum(Integer code, String message) {
            this.code = code;
            this.message = message;
        }
    }

    /**
     * 合作商家申请状态
     */
    @Getter
    public enum PartnerStatusEnum {
        NOT_APPLY((byte) 0, "未申请"),
        APPLYING((byte) 1, "申请中"),
        AGREED((byte) 2, "已同意"),
        REJECTED((byte) 3, "已拒绝"),
        ;

        private Byte code;
        private String message;

        PartnerStatusEnum(Byte code, String message) {
            this.code = code;
            this.message = message;
        }
    }
}
